<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<meta name="referrer" content="no-referrer"/>
<head th:include="component/heard :: head"></head>
<script src="/js/mycard.js"></script>
<body class="">
<nav th:include="component/nav :: nav"></nav>
<div class="container">
    <div class="row">
        <div th:each="c : ${cardlist}" class="col-sm-4">
            <div class="card " style="margin-top: 10px; ">
                <div class="card-body">
                    <h5 class="card-title">[[${c.title}]] </h5>
                    <p class="card-text" >[[${c.content}]]
                        <span class="badge  text-dark "style="font-size: 5px;" th:text="${#strings.replace(c.category,'Test','')}">Dark</span></p>
                    <a th:href="@{'/card/detail/'+${c.id}}" class="link-success">详情</a>
                    <a href="#" th:onclick="'myCard.delCard(\'' + ${c.id} + '\');'" class="link-danger">删除</a>
                </div>
            </div>
        </div>
        <div class="col-sm-4">
            <div class="card " style="margin-top: 10px; ">
                <div class="card-body">
                    <a href="/card/edit/0" class="link-primary">创建新的卡片</a>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
